package com.puzzlebazar.client.main.control;

import com.puzzlebazar.client.util.Releasable;

public interface GenericController extends Navigation, Releasable {

	/**
	 * Ask the user to confirm leaving a state, or automatically accept if 
	 * no message is specified.
	 * 
	 * @return True if leaving the state has been accepted, false otherwise.
	 */
	public boolean confirmLeaveState();
	
	/**
	 * Sets the string to display when the system needs to confirm leaving a state.
	 * A state is left when the user navigates to a new page or tries to close
	 * the window.
	 * Set this value to null to automatically accept leaving the current state.
	 * 
	 * @param confirmLeaveState The string to display to confirm a state change
	 */
	public void setConfirmStateChange(String confirmLeaveState);
	
	/**
	 * Have the controller enter the initial default state that should be fired when no history token is used
	 */
	public void gotoDefaultState();	
	
}